<?php 
    if (array_key_exists('msgSucesso', $_GET)){
        $msg=$_GET['msgSucesso'];
        if($msg=='ok'){
            echo "<script type='text/javascript'>alert('Seu cadastro foi realizado com sucesso!')</script>";
        }
    }
    
    if(array_key_exists('erroController', $_GET)){
        $msg=$_GET['erroController'];
            echo "<script type='text/javascript'>alert('$msg')</script>";
        
    }
?>
<html>
    <h1 class="h1Cadastrar">PARTICIPE</h1>
    <br />
        <script type="text/javascript" src="../utils/validarForm.js"></script>
        <form name="formulario" action="../../Controller/InserirAtleta.php" method="post" onSubmit="return validarForm();">
        <div id ="cadastrar">        
            <label for="nomeCompleto">Nome <br />Completo: </label>           
            <input type="text"  maxlength="60" name="nomeCompleto" id="nomeCompleto" /><br />
            <label for="email">Email: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>           
            <input type="text" maxlength="40" name="email" id="email" /><br />
            <label for="login" >Login: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>        
            <input type="text"  maxlength="10" name="login" id="login" /><br />
            <label for="senha">Senha: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
            <input type="password"  maxlength="8" name="senha" id="senha"/><br />
            <label for="localizacaoCidade">Cidade: &nbsp;&nbsp;&nbsp;&nbsp;</label>
            <input type="text" maxlength="40" name="localizacaoCidade" id="localizacaoCidade" /><br />
            <label for="localizacaoEstado">Estado: &nbsp;&nbsp;&nbsp;&nbsp;</label>
            <input type="text" maxlength="40" name="localizacaoEstado" id="localizacaoEstado" /><br />
        </div>
        <div id="dataNascimento">
            <label for="diaNascimento" style="float:left">Dia: </label>
            <select name="diaNascimento" style="float:left">
             <?php
                    for($dia=01;$dia<=31;$dia++){
                        echo "<option value=$dia>$dia</option>;";
                    }
            ?>
            </select>
                   
            <label for="mesNascimento" style="float:left"> &nbsp;&nbsp;Mês: </label>
                <select name="mesNascimento" style="float:left">
                    <option value="Jan" selected>Jan</option>
                    <option value="Fev">Fev</option>
                    <option value="Mar">Mar</option>
                    <option value="Abr">Abr</option>
                    <option value="Mai">Mai</option>
                    <option value="Jun">Jun</option>
                    <option value="Jul">Jul</option>
                    <option value="Ago">Ago</option>
                    <option value="Set">Set</option>
                    <option value="Out">Out</option>
                    <option value="Nov">Nov</option>
                    <option value="Dez" >Dez</option>
                </select>
            <label for="anoNascimento" style="float:left"> &nbsp;&nbsp;Ano: </label>
            <select name="anoNascimento" style="float:left">
                <?php
                    for($ano=1900;$ano<=2010;$ano++){
                        echo "<option value=$ano>$ano</option>;";
                    }
                ?>
                <option value="2011" selected>2011</option>;
            </select>
            </div>
        <div id="botaoCadastrar">
            <br /><input type='submit' value ="Cadastrar"/>
        </div>   
    </form>   
</html>
